<?php
/**
 * PHP Class
 *
 * LICENSE
 *
 * Processing:
 *
 * @category   	Joomzf Cms
 * @package    	Controller Action
 * @copyright  	Copyright vinanewstar.vn@gmail.com
 * @author		GiangNam (vinanewstar.vn@gmail.com)
 * @license    	GNU General Public License Version 2 or later (the "GPL")
 * @version     v1.0 May 20, 2012 - 4:41:23 PM
 */
class Joomzf_Controller_Action extends Zend_Controller_Action{
	protected  $_template;
	protected  $_language;
	protected  $_component;
	protected  $_locale;
	
	protected $_moduleListObj;
	public $area;
	public function init(){
		//front end so area =0
		$this->area = ($this->_request->getParam("controller") == "index") ? 0:1;
		$this->initLocale();
		$this->initTemplate();
		
		$this->initComponent();
		
		$this->initLanguage();
		
		
	}
	public function initLocale(){
		$this->_locale = Zend_Registry::get("Locale");
	}
	public function initComponent(){
		$this->_component = new Joomzf_Component($this);
	}
	public function initTemplate(){
		$this->_template = new Joomzf_Template($this);
	}
	public function initLanguage(){
		$this->_language = new Joomzf_Translate($this);
	}
	public function redirect($url, array $options = array()){
		parent::_redirect($url,$options);
	}
	public function getTemplate(){
		return $this->_template;
	}
	public function getLocale(){
		return $this->_locale;
	}
	public function getComponent(){
		return $this->_component;
	}
	public function getLanguage(){
		return $this->_language;
	}
	public function getArea(){
		return $this->area;
	}
}